perm filename INTOPS.PAL[HAL,HE]6 blob
sn#163872 filedate 1975-06-19 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .SBTTL Table of interpreter instructions
C00008 ENDMK
C⊗;
.SBTTL Table of interpreter instructions
;This is parallel to the file INTDEF.SAI[H,RF]
II == 2 ;Start of interpreter jump table (0 is illegal instruction)
;Motion control
MAKEOP XMOVE,MOVE;a ;Prepare, execute move whose traj table is at a.
;Variables
MAKEOP XMVAR,MVAR;l ;Make graph node for given offsets (list arg)
MAKEOP XKVAR,KVAR;l ;Kill graph node at given offsets (list arg)
MAKEOP XMAKEVT,MAKEVT;l;Make event variables with offsets as in list.
MAKEOP XDESEVT,DESEVT;l;Kill event variables with offsets as in list.
MAKEOP XMCLC,MCLC;o,a ;Make a calculator for variable at level-offset o at address a.
;Stack operations
MAKEOP XGTVAL,GTVAL;a ;Push value of arg (level-offset pair).
MAKEOP XIGTVAL,IGTVAL;a;Push arg (immediate).
MAKEOP XCHNGE,CHNGE;a ;Pop value into arg (level-offset pair).
MAKEOP XICHNGE,ICHNGE;a;Pop value into arg (immediate).
MAKEOP XPUSH, PUSH ;a ;Push arg directly (as a ptr) onto stack. For cnstnts.
MAKEOP XPOP, POP ;Pop stack.
MAKEOP XCOPY, COPY ;n ;Copy n'th down to top of stack.
MAKEOP XREPLAC,REPLAC;n;Replace n'th down with top (which pop)
MAKEOP XFLUSH,FLUSH ;Flush the entire stack.
;Flow of control
MAKEOP XJUMP, JUMP ;a ;Jump to address
MAKEOP XJUMPC,JUMPC;c,a;Jump to address only if condition on top (which pop)
MAKEOP XTERMINATE,TERMINATE ;Terminate this interpreter
MAKEOP XENDCLC,ENDCLC ;Return from calculator cell
MAKEOP XPROC, PROC;d,al;Call a procedure at d, with arg list al.
MAKEOP XRETURN,RETURN ;Return from procedure
MAKEOP XSPROUT,SPROUT;l;Sprout interpreters at given places, wait (list arg)
MAKEOP XFORCHK,FORCHK;d;Do a FOR-loop check, and fail to location d.
MAKEOP XSIGNAL,SIGNAL;a;Signal event at level-offset a.
MAKEOP XWAITE,WAITE;a ;Wait on event at level-offset a.
;Arithmetic
MAKEOP XSADD, SADD ;S+S: Add top two elts, pop, pop, push answer
MAKEOP XSSUB, SSUB ;S-S: Sub top two elts, pop, pop, push answer
MAKEOP XSMUL, SMUL ;S*S: Mul top two elts, pop, pop, push answer
MAKEOP XSDIV, SDIV ;S/S: Div top two elts, pop, pop, push answer
MAKEOP XSNEG, SNEG ;-S: Negate top elt, pop, push answer
MAKEOP XVMAGN, VMAGN ;Scalar ← norm of vector
MAKEOP XSVMUL,SVMUL ;Vector ← scalar * vector
MAKEOP XVDOT, VDOT ;S ← vector dot vector
MAKEOP XPVDOT,PVDOT ;S ← vector dot vector
MAKEOP XVMAKE,VMAKE ;V ← vector(scalar,scalar,scalar)
MAKEOP XVADD, VADD ;V ← vector + vector
;UNITV remove ;Vector ← vector / its norm
;CROSV remove ;Vector ← vector cross vector
MAKEOP XTVMUL,TVMUL ;Vector ← trans * vector
;FTOF
MAKEOP XTMAKE,TMAKE ;Trans ← trans(rot,vector)
MAKEOP XTTMUL,TTMUL ;Trans ← trans * trans
;TINVRT
;Condition monitors
MAKEOP XCMMAK,CMMAK;o ;Make a c-m at offset o
MAKEOP XCMENBL,CMENBL;a;Enable c-m at level-offset a
MAKEOP XCMDSBL,CMDSBL;a;Disable c-m at level-offset a
MAKEOP XCMDEST,CMDEST;l;Destroy c-m at offset o (list arg)
MAKEOP XCMTRIG,CMTRIG ;Trigger the c-m body (use only in checker)
MAKEOP XCMSKED,CMSKED ;Sleep for a while (use only in checker)
MAKEOP XCMUNCR,CMUNCR ;Start uncritical section
MAKEOP XCMBWT,CMBWT ;Wait for trigger (use only in body)
;Debugging aids
MAKEOP XPRINT,PRINT ;Type an ASCIZ string on the VT05.
MAKEOP XPRNTS,PRNTS ;Type an scalar value, which pop, on the VT05.
MAKEOP XBREAK,BREAK ;Breakpoint in the program
MAKEOP XNOOP,NOOP ;Null operation